package com.hunan.api.catv.service.impl.tencent_cloud.sts;

import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.Region;
import com.tencentcloudapi.sts.v20180813.StsClient;
import com.tencentcloudapi.sts.v20180813.models.GetFederationTokenRequest;
import com.tencentcloudapi.sts.v20180813.models.GetFederationTokenResponse;
import org.springframework.stereotype.Service;

@Service
public class StsService {

    public static void main(String[] args) throws TencentCloudSDKException {

        String secretId = "AKIDKm0ymLnka9ZmmfOzUlthMm1GLAlARPDl";
        String secretKey = "yiOp0jGbrrkPtDIF3yoQwCDl47uRejZI";
        Credential credential = new Credential(secretId, secretKey);
        StsClient stsClient = new StsClient(credential, Region.Guangzhou.getValue());
        GetFederationTokenRequest request = new GetFederationTokenRequest();
        GetFederationTokenResponse response = stsClient.GetFederationToken(request);
    }

}
